package com.example.leave.exception;

/**
 * @author huang
 */

public enum ExceptionEnum implements BaseErrorInfoInterface {

    SUCCESS("200", "成功!"),
    BODY_NOT_MATCH("400", "请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH("401", "请求的数字签名不匹配!"),
    NOT_FOUND("404", "未找到该资源!"),
    INTERNAL_SERVER_ERROR("500", "服务器内部错误!"),
    SERVER_BUSY("503", "服务器正忙，请稍后再试!"),
    INSERT_ERROR("100", "插入错误"),
    ILLEGAL_PARAMETER("101", "非法参数");
    /**
     * 错误码
     */
    private final String code;

    /**
     * 错误描述
     */
    private final String message;

    ExceptionEnum(String resultCode, String resultMsg) {
        this.code = resultCode;
        this.message = resultMsg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
